package com.easyim.imserver.utils;

import com.easyim.imserver.constant.RedisKey;

public class RedisKeyUtils {


    public static String buildSessionMsgKey(String sessionId){
        return String.format("%s:%s", RedisKey.SESSION_PREFIX, sessionId);
    }

    public static String buildUserSessionKey(String userId){
        return String.format("%s:%s", RedisKey.USER_SESSION_PREFIX, userId);
    }

    public static String buildUserReadMsgKey(String userId, String deviceId){
        return String.format("%s:%s:%s", RedisKey.USER_READ_CURSOR_PREFIX, userId, deviceId);
    }
}
